package com.icbc.digitalwallet.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @PackgeName: com.icbc.digitalwallet.common.enums
 * @ClassName: BankCodeEnum
 * @Author: tx
 * Date: 2021/7/18 20:30
 * project name: digitalwallet
 * @Version:
 * @Description:
 */
@AllArgsConstructor
@Getter
public enum BankCodeEnum {
    PBOC("001","中国人民人行"),
    ICBC("102","中国工商银行"),
    ABC("103","中国农业银行"),
    BOC("104","中国银行"),
    CCB("105","中国建设银行")
    ;

    private String bankCode;
    private String bankName;

    public static String getBankName(String bankCode) {
        for (BankCodeEnum obj:BankCodeEnum.values()){
            if (bankCode.equals(obj.getBankCode())){
                return obj.getBankName();
            }
        }
        return "";
    }
}
